<template>
	<view class="content">
		<view v-for="(item, index) in inputs" :key="index" >
			<view class="justify-between">
				<input :placeholder="'请输入第'+(index+1)+'项奖品'" v-model="item.value" />
				<input :placeholder="'请输入第'+(index+1)+'项概率'" v-model="item.gailv" />
			</view>
			
		</view>
		<!-- <button type="primary" @click="addInput">添加输入框</button> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				inputs: [{
					value: '',
					gailv: 0,
				}]
			}
		},
		mounted() {
			this.init();
		},
		methods: {
			//初始化九宫格
			init() {
				this.inputs=[];
				for (let i = 0; i < 8; i++) {
					this.inputs.push({
						value:'',
						gailv:0
					});
				}
			},
			addInput() {
				this.inputs.push({
					value: ''
				});
			}
		}
	}
</script>

<style lang="scss">

</style>